package io.kiki.sba.registry.common.model.dataserver;

import io.kiki.sba.registry.common.model.ClientInterfaceId;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;


@Getter
public abstract class AbstractSlotRequest implements Serializable {

    protected final ClientInterfaceId clientInterfaceId;
    private final int slotId;

    @Setter
    protected long slotsEpoch;
    @Setter
    protected long slotLeaderEpoch;

    protected AbstractSlotRequest(int slotId, ClientInterfaceId clientInterfaceId) {
        this.slotId = slotId;
        this.clientInterfaceId = clientInterfaceId;
    }

    protected AbstractSlotRequest(int slotId, ClientInterfaceId clientInterfaceId, long slotsEpoch, long slotLeaderEpoc) {
        this.slotId = slotId;
        this.clientInterfaceId = clientInterfaceId;
        this.slotsEpoch = slotsEpoch;
        this.slotLeaderEpoch = slotLeaderEpoc;
    }

}
